      *> File Name     000015_Streams.cbl.
      *> Description   File IO with StreamReader and StreamWriter.
      *> Project Type  Console Application.
      *> CodePlex URL  http://cobol.codeplex.com
 
       program-id.   Main.
       repository.
           class sys-console as "System.Console"
           class reader      as "System.IO.StreamReader"
           class writer      as "System.IO.StreamWriter"
           .
       working-storage section.
       01  r  reader.
       01  w  writer.
       procedure division.
           move "File IO with Streams" to sys-console::"Title"
 
           move writer::"New"("USS_Hopper.txt") to w
           invoke w::"WriteLine"("Aude et effice.")
           invoke w::"WriteLine"("Dare and do.")
           invoke w::"Close"
 
           move reader::"New"("USS_Hopper.txt") to r
           display r::"ReadToEnd"
           invoke r::"Close"
 
           display "Press any key to continue . . . " no advancing
           invoke sys-console::"ReadKey"(true)
           .
       end program   Main.